package com.zwz.voObject;

import com.github.pagehelper.PageInfo;
import lombok.Data;

import java.util.List;

@Data
public class DatabaseMetaVO2 {
    private Integer code;
    private String message;
    private MetaData data;

    @Data
    public static class MetaData {
        private PageInfo<EnterpriseBean> data;

    }


    public static DatabaseMetaVO2 success(PageInfo<EnterpriseBean> tables) {
        DatabaseMetaVO2 vo = new DatabaseMetaVO2();
        vo.setCode(200);
        vo.setMessage("success");
        MetaData metaData = new MetaData();
        metaData.setData(tables);
        vo.setData(metaData);

        return vo;
    }

    public static DatabaseMetaVO2 error(String message) {
        DatabaseMetaVO2 vo = new DatabaseMetaVO2();
        vo.setCode(500);
        vo.setMessage(message);
        return vo;
    }
} 